AllureHelper

Статический класс с методами управления шагами отчета Allure.

Пример:

AllureHelper.runStep("Название шага", () -> {
// ...
var value = getValue();
AllureHelper.setParameterToStep("value", value);
// ...
});

Properties

Link copied to clipboard
private var allureLifecyclesMap: ConcurrentHashMap<Long, AllureLifecycle>
Link copied to clipboard

Functions

Link copied to clipboard
fun addAttachment(fileName: String, file: File)

Добавление файла к отчету

internal fun addAttachment(name: String, type: String, content: String, fileExtension: String): Unit?
Link copied to clipboard
internal fun clone(id: Long)
Link copied to clipboard
internal fun create()
Link copied to clipboard
private fun getAllureLifecycle(): AllureLifecycle?
Link copied to clipboard
fun runStep(stepName: String, stepRunnable: Runnable)

Создание шага Allure и выполнение переданной лямбды.

fun <T> runStep(stepName: String, stepFunction: () -> T): T?

Создание шага Allure, выполнение переданной лямбды и получение из неё объекта.

Link copied to clipboard
fun <T> setParameterToStep(parameterName: String, parameterValue: T?)

Установка параметра шагу Allure.

internal fun <T> setParameterToStep(parameterName: String, parameterValue: T?, stepId: String?)
Link copied to clipboard
private fun setStatus(stepResult: StepResult)
Link copied to clipboard
internal fun startStep(stepName: String): String
internal fun <T> startStep(stepName: String, parameterName: String, parameterValue: T?): String
internal fun <T1, T2> startStep(stepName: String, parameterName1: String, parameterValue1: T1?, parameterName2: String, parameterValue2: T2?): String
Link copied to clipboard
internal fun stopAllSteps()
Link copied to clipboard
internal fun stopStep(stepId: String)
Link copied to clipboard
internal fun stopStepAsBrokenById(stepId: String, throwable: Throwable? = null): Unit?
Link copied to clipboard
internal fun stopStepAsFailedById(stepId: String, throwable: Throwable? = null): Unit?
Link copied to clipboard
internal fun stopStepAsSkippedById(stepId: String): Unit?
Link copied to clipboard
private fun stopStepById(stepId: String)
Link copied to clipboard
internal fun updateStepName(stepId: String, newName: String): Unit?